package com.ceshiren.test.houduankaifa.controller;


import com.ceshiren.test.houduankaifa.confg.JDBCConfig;
import com.ceshiren.test.houduankaifa.service.JdbcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
public class BaseConfigController {

    @Value("${android.deviceName}")
    private String deviceName;

    @GetMapping("/getConfig")
    public String getConfig() {
        System.out.println("配置文件：" + deviceName);
        return deviceName;
    }

    @Autowired
    JdbcService jdbcService;

    @GetMapping(value = "getJdbcConfig")
    public HashMap<String, String> getJdbcConfig() {
        return jdbcService.getJdbc();
    }

}
